using SG3L_RAG.Domain.Entities;

namespace SG3L_RAG.Application.Interfaces
{
    public interface IPermissionService
    {
        Task<Permission?> GetByIdAsync(Guid id);
        Task<IEnumerable<Permission>> GetAllAsync();
        Task<Permission> CreateAsync(Guid documentId, Guid userId, string permissionType);
        Task UpdateAsync(Permission permission);
        Task DeleteAsync(Guid id);
        Task<IEnumerable<Permission>> GetByDocumentIdAsync(Guid documentId);
        Task<IEnumerable<Permission>> GetByUserIdAsync(Guid userId);
        Task<Permission?> GetPermissionAsync(Guid documentId, Guid userId);
        Task<bool> HasPermissionAsync(Guid documentId, Guid userId, string permissionType);
        Task GrantPermissionAsync(Guid documentId, Guid userId, string permissionType);
        Task RevokePermissionAsync(Guid documentId, Guid userId);
        Task<IEnumerable<Permission>> GetByPermissionTypeAsync(string permissionType);
    }
}
